package com.molichuxing.gateway.bff.financial.entity.request.create;

import com.molichuxing.framework.dto.RequestRootDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;


/**
 * <p>
 * 发票添加
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-09-26
 */
@Data
public class InvoiceCreateVo extends RequestRootDto {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "开具发票id")
    @NotNull(message = "请选择开票数据")
    private List<Integer> invoiceIdList;

    @ApiModelProperty(value = "发票抬头类型 1：个人 2：企业单位")
    @NotNull(message = "请选择发票类型")
    private Integer invoiceTitleType;

    @ApiModelProperty(value = "发票抬头")
    @NotBlank(message = "请输入发票抬头")
    private String purchaserName;

    @ApiModelProperty(value = "税号")
    private String purchaserTaxNumber;

    @ApiModelProperty(value = "电子邮箱")
    @NotBlank(message = "请输入电子邮箱")
    @Pattern(regexp = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$",message = "邮箱格式错误！请重新输入")
    private String email;
}
